<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="DownloadHelper,com.emc.esu.helpers.DownloadHelper,bytesLoaded,bytesTotal,checksum,checksumming,complete,error,failed,objectId,stream,userState,cancel,readObject" name="keywords">
<title>com.emc.esu.helpers.DownloadHelper</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'DownloadHelper - API Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">EMC ESU API for Adobe Flex</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/emc/esu/helpers/DownloadHelper.html&amp;com/emc/esu/helpers/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;DownloadHelper</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class DownloadHelper"); titleBar_setSubNav(false,true,false,false,true,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.emc.esu.helpers</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class DownloadHelper</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">DownloadHelper <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
</table>
<p></p>
  Helper class to download objects.  For large transfers, the content
  generally needs to be transferred from the server in smaller chunks.  This
  helper class reads an object's contents incrementally from the server and
  writes it to a stream.
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bytesLoaded">bytesLoaded</a> : Number<div class="summaryTableDescription">
      The number of bytes loaded from the object
      </div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bytesTotal">bytesTotal</a> : Number<div class="summaryTableDescription">
      The total number of bytes in the object
      </div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#checksum">checksum</a> : <a href="../api/Checksum.html">Checksum</a>
<div class="summaryTableDescription">[read-only]</div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#checksumming">checksumming</a> : Boolean<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#complete">complete</a> : Boolean<div class="summaryTableDescription">
      Set to true when the request has completed
      </div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#error">error</a> : Error<div class="summaryTableDescription">
      Contains the error object if the request
      has failed, otherwise it will be null.</div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#failed">failed</a> : Boolean<div class="summaryTableDescription">
      Set to true when the request has failed
      </div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#objectId">objectId</a> : <a href="../api/Identifier.html">Identifier</a>
<div class="summaryTableDescription">
   Contains the ObjectId being downloaded.</div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#stream">stream</a> : IDataOutput<div class="summaryTableDescription">[read-only]</div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#userState">userState</a> : Object<div class="summaryTableDescription">
   Allows the user to attach a state object to track information
   across events.</div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#DownloadHelper()">DownloadHelper</a>(esu:<a href="../api/EsuApi.html">EsuApi</a>, requestSize:Number)</div>
<div class="summaryTableDescription">
   Creates a new download helper.</div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#cancel()">cancel</a>():void</div>
<div class="summaryTableDescription">
   Cancels the download.</div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#readObject()">readObject</a>(id:<a href="../api/Identifier.html">Identifier</a>, stream:IDataOutput):void</div>
<div class="summaryTableDescription">
   Starts the download of the Object.</div>
</td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
</table>
</div>
<a name="eventSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Events</div>
<table id="summaryTableEvent" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Event</th><th>Summary</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:complete">complete</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">
  Dispatched when the download helper has completed
  </td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:error">error</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">
  Dispatched when the download helper encounters an error
  </td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:progress">progress</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">
  Dispatched as data chunks are read from the server
  </td><td class="summaryTableOwnerCol">DownloadHelper</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="bytesLoaded"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">bytesLoaded</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>bytesLoaded:Number</code>&nbsp;&nbsp;[read-write]<p>
      The number of bytes loaded from the object
      </p><p>This property can be used as the source for data binding.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get bytesLoaded():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set bytesLoaded(value:Number):void</code>
<br>
</div>
<a name="bytesTotal"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">bytesTotal</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>bytesTotal:Number</code>&nbsp;&nbsp;[read-write]<p>
      The total number of bytes in the object
      </p><p>This property can be used as the source for data binding.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get bytesTotal():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set bytesTotal(value:Number):void</code>
<br>
</div>
<a name="checksum"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">checksum</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>checksum:<a href="../api/Checksum.html">Checksum</a></code>&nbsp;&nbsp;[read-only]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get checksum():<a href="../api/Checksum.html">Checksum</a></code>
<br>
</div>
<a name="checksumming"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">checksumming</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>checksumming:Boolean</code>&nbsp;&nbsp;[read-write]<p>This property can be used as the source for data binding.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get checksumming():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set checksumming(value:Boolean):void</code>
<br>
</div>
<a name="complete"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">complete</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>complete:Boolean</code>&nbsp;&nbsp;[read-write]<p>
      Set to true when the request has completed
      </p><p>This property can be used as the source for data binding.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get complete():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set complete(value:Boolean):void</code>
<br>
</div>
<a name="error"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">error</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>error:Error</code>&nbsp;&nbsp;[read-write]<p>
      Contains the error object if the request
      has failed, otherwise it will be null.
      </p><p>This property can be used as the source for data binding.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get error():Error</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set error(value:Error):void</code>
<br>
</div>
<a name="failed"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">failed</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>failed:Boolean</code>&nbsp;&nbsp;[read-write]<p>
      Set to true when the request has failed
      </p><p>This property can be used as the source for data binding.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get failed():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set failed(value:Boolean):void</code>
<br>
</div>
<a name="objectId"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">objectId</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>objectId:<a href="../api/Identifier.html">Identifier</a></code>&nbsp;&nbsp;[read-write]<p>
   Contains the ObjectId being downloaded.
   </p><p>This property can be used as the source for data binding.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get objectId():<a href="../api/Identifier.html">Identifier</a></code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set objectId(value:<a href="../api/Identifier.html">Identifier</a>):void</code>
<br>
</div>
<a name="stream"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stream</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>stream:IDataOutput</code>&nbsp;&nbsp;[read-only]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get stream():IDataOutput</code>
<br>
</div>
<a name="userState"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">userState</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>userState:Object</code>&nbsp;&nbsp;[read-write]<p>
   Allows the user to attach a state object to track information
   across events.
   </p><p>This property can be used as the source for data binding.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get userState():Object</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set userState(value:Object):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="DownloadHelper()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">DownloadHelper</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function DownloadHelper(esu:<a href="../api/EsuApi.html">EsuApi</a>, requestSize:Number)</code><p>
   Creates a new download helper.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">esu</span>:<a href="../api/EsuApi.html">EsuApi</a></code> &mdash; the EsuApi object to use for downloads.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">requestSize</span>:Number</code> &mdash; the amount of data to download in each request.  By
   default this is 4MB.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="cancel()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">cancel</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function cancel():void</code><p>
   Cancels the download.
   </p></div>
<a name="readObject()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">readObject</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function readObject(id:<a href="../api/Identifier.html">Identifier</a>, stream:IDataOutput):void</code><p>
   Starts the download of the Object.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">id</span>:<a href="../api/Identifier.html">Identifier</a></code> &mdash; the ObjectId to download.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">stream</span>:IDataOutput</code> &mdash; the stream to write the object to.
   </td>
</tr>
</table>
</div>
<div class="detailSectionHeader">Event detail</div>
<a name="event:complete"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">complete</td><td class="detailHeaderType">event&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href=""><code>flash.events.Event</code></a>
<br>
<p></p><p>
  Dispatched when the download helper has completed
  </p></div>
<a name="event:error"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">error</td><td class="detailHeaderType">event&nbsp;</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href=""><code>flash.events.ErrorEvent</code></a>
<br>
<p></p><p>
  Dispatched when the download helper encounters an error
  </p></div>
<a name="event:progress"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">progress</td><td class="detailHeaderType">event&nbsp;</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href=""><code>flash.events.ProgressEvent</code></a>
<br>
<p></p><p>
  Dispatched as data chunks are read from the server
  </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">Copyright (c) 2008 EMC</center>
</div>
</body>
</html>
<!--Copyright (c) 2008 EMC-->
